The present invention generally relates to image extraction systems, and more particularly to an image extraction system for extracting characters, graphics and the like which touch a character frame, a rule and the like in a hand-written character recognition apparatus such as an optical character reader (OCR).
As more input/output devices are designed for hand-written characters, the demands for hand-written character recognition apparatuses are increasing. In order to achieve a high recognition rate of individual characters in a hand-written character recognition apparatus, it is important that the process of extracting the character is carried out accurately prior to the recognition stage.
As many kinds of document are the subject of character recognition, there are documents such as form sheets which specify the positions where characters should be written. In such documents, a frame or the like which specifies the position where the character should be written is printed not in faded color, but in the same color and density as the character. That is, a black frame, a black rule or the like is printed on such a document. Accordingly, if characters are clearly written within specified ranges, it is possible to automatically recognize characters at a relatively high recognition rate. However, if the hand-written character exceeds the specified range and touches or penetrates the frame or rule which indicates the specified range, there was a problem in that the recognition rate greatly deteriorates.
FIG. 1 shows an image extraction system previously proposed in a U.S. patent application Ser. No. 192,592 filed Feb. 7, 1994. An input pattern to be subjected to the processing is a binary image that is already subjected to a preparation such as correcting extreme inclination or rotation (that is, skew), noise elimination and filling of gaps introduced by grazing or the like. In other words, with regard to the character frame, a plurality of block frames which are elongated in the horizontal direction are arranged, and the size, position and inclination of the block frames are unknown. Hand-written characters are written in such block frames, and only the block frame is eliminated even if the character touches the block frame or the character projects out from the block frame.
As shown in FIG. 1, the image extraction system includes a connected pattern extracting part 40, a line segment detector 41, a straight line detector 42, a frame detector 43, and a frame separating part 44. The connected pattern extracting part 40 extracts a partial pattern having pixels which are connected from the input pattern which is formed by the straight line portion such as the frame and rule and the character, graphic or symbol. The line segment detector 41 detects the line segment or a portion of the straight line at a predetermined length for every connected pattern using "adjacent projection". The "adjacent projection" will be described later. The straight line detector 42 detects a long straight line by integrating a plurality of line segments or portions of the straight line which are obtained. The frame detector 43 detects the straight line forming the character frame based on the intervals or the like of the plurality of straight lines which are obtained. The frame separating part 44 divides the block frame into frames of one character (that is, 1-character frames) based on the intersection of the frames to calculate the width of each frame, and separates the character frame from the connected pattern depending on the width.
On the other hand, if the frame to be eliminated from the input pattern which is to be subjected to the processing is of a kind other than the block frame described above, there are other frame extraction methods such as those proposed in Japanese Laid-Open Patent Applications No. 62-212888 and No. 3-126186. According to such frame extraction methods, format information related to information such as the position and size, and information related to the inclination are input in advance and prestored in the form or form data. The frame is eliminated based on the prestored information.
However, the previously proposed image extraction system shown in FIG. 1 has the following problems and there is still room for further improvement. First, if the frame is other than the 1-character frames or the block frames arranged in the horizontal row, that is, in the case of a block frame having a table format or a free format frame, the frame extraction process could not be carried out. Second, since the straight line detector 42 includes a thinning part and carries out a thinning process, the processing time was extremely long. In addition, when the thinning process is carried out, the linearity of the original image was lost. As a result, an original image shown in FIG. 2A, for example, became as shown in FIG. 2B after the thinning process, and it was difficult to extract the frame from the thinned image shown in FIG. 2B. Third, when one character connects to a plurality of adjacent 1-character frames and a discontinuity of the straight line is found during a search, the subsequent processes were not carried out by regarding that the frame is neither a block frame nor a 1-character frame. Fourth, because the frame extraction is made by the search when eliminating the 1-character frame, the frame extraction could not be made if the search failed.
The fourth problem described above will be described in more detail, by referring to an example shown in FIG. 3. When the search is started from a starting point A in FIG. 3, the search for the partial pattern is made from the top to bottom, and from the left to right by a predetermined number of pixels corresponding to the width of the frame, for example, if the search cannot be made in the downward direction. Hence, the search is made satisfactorily as indicated by an arrow in FIG. 3. However, if the search is started from a starting point B in FIG. 3, the search for the partial pattern cannot advance in the downward direction. In addition, even if the search advances from the left to right by the predetermined number of pixels, no partial pattern exists in the downward direction. As a result, the search started from the starting point B will fail as indicated by an arrow in FIG. 3. Therefore, in the latter case where the search is started from the starting point B, it is impossible to extract the frame.
On the other hand, according to the frame extraction methods proposed in the Japanese Laid-Open Patent Applications No. 62-212888 and No. 3-126186, it is possible to extract the frame even if the frame to be subjected to the processing is the block frame or the like having the table format. However, the format information related to the position, size and the like and the information related to the inclination must be input and stored in advance in the form of the form data. For this reason, there was a fifth problem in that the process is easily affected by even the slight inclination or unevenness of the character frame itself. In other words, there were cases where the character frame projecting from a predetermined position is regarded as a character and not extracted during the character extraction or, on the contrary, the character portion is extracted as the frame. Furthermore, it takes an extremely long time for a user to input all of the information related to each of the frames, and there was a problem in that the load on the user is extremely large.